package com.lonwin.inspectionmanagement.mvp.contract;

import android.app.Activity;

import com.jess.arms.mvp.BaseModel;
import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.BaseBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.ConfigBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.CreaQuestResultBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.ImageBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.PointHistoryBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.ProblemBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.ResQdetailBean;
import com.lonwin.inspectionmanagement.mvp.model.entity.bean.SaveResultBean;

import java.io.File;
import java.util.List;
import java.util.Map;

import io.reactivex.Observable;


public interface CreatPointRecordContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        Activity getActivity();
       void initPicRecylerView(List<ImageBean> imageBeans);

       void audioUpSuccess(String path);
       void imgUpSuccess(String path);
       void videoUpSuccess(String path);
       void videoPicUpSuccess(String path);

       void showMultilChoice(List<ProblemBean> problemBeans);

       void savePointDataSuccess(SaveResultBean pointHistoryBean);

       void editPointSuccess(PointHistoryBean.DataBean dataBean);

       void addQuestTempSuccess(CreaQuestResultBean.DataBean dataBean);


       void setDetailBean(ResQdetailBean.DataBean dataBean);


       void deleteSuccess();
       void publishSuccess(ResQdetailBean resQdetailBean);
       void updateSuccess(ResQdetailBean resQdetailBean);

    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<String> uploadFile(String url,File file);

        Observable<List<ConfigBean.XcglMenuBean>>  getListProblems();

        Observable<SaveResultBean> savePointData(String url, Map<String,String> maps);

        Observable<PointHistoryBean.DataBean> editPoint(String url, Map<String,String> maps);

        Observable<CreaQuestResultBean> addQuestTemp(String url, Map<String,Object> maps);

        Observable<ResQdetailBean> loadDetail(String url,String id);

        Observable<ResQdetailBean> updateQuestion(String url,ResQdetailBean.DataBean resQdetailBean);

        Observable<BaseBean> deleteQuestion(String url,String id);

        Observable<ResQdetailBean> publishQuestion(String url,String id);
    }
}
